﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="CategoryManager.aspx.cs" Inherits="CategoryManager" Title="Category" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <div id="toolbar_box">
                    <div class="t">
                        <div class="t">
                            <div class="t"></div>
                        </div>
                    </div>
                    
                    <div class="m">
                        <div id="toolbar" class="toolbar">
                            <table class="toolbar">
                                <tr>
                                    <td id="toolbar_delete" class="button">
                                        <%--<a href="#" class="toolbar">
                                            <span class="icon-32-delete"></span>
                                        Xóa</a>--%>
                                        <asp:LinkButton runat="server" ID="lbtDelete" onclick="lbtDelete_Click" OnClientClick="return confirm('Bạn có chắc muốn xóa?');">
                                            <span class="icon-32-delete"></span>
                                            Xóa
                                        </asp:LinkButton>
                                    </td>
                                    <%--<td id="toolbar_update" class="button"><a href="#" class="toolbar"><span class="icon-32-edit"></span>Sửa</a></td>--%>
                                    <td id="toolbar_add" class="button"><a href="AddUpdateCategory.aspx" class="toolbar"><span class="icon-32-new"></span>Thêm</a></td>
                                    <td id="toolbar_help" class="button"><a href="#" class="toolbar"><span class="icon-32-help"></span>Trợ giúp</a></td>
                                </tr>
                            </table>
                        </div>
                        <div class="header category">
                            QUẢN LÝ CÁC NHÓM TIN TỨC
                        </div>
                        <div class="clr"></div>
                    </div>
                    
                    <div class="b">
                        <div class="b">
                            <div class="b"></div>
                        </div>
                    </div>
    </div><!--End toolbar_box--------------------------------------------------->
    
    
    <div id="element-box">
                    <div class="t">
                        <div class="t">
                            <div class="t"></div>
                        </div>
                    </div>
                    
                    <div class="m">                        
                        <table class="adminlist" style="">
                            <thead>
                                <tr>
                                    <th class="title" width="5%">STT</th>
                                    <th class="title" width="5%">
                                        <asp:CheckBox runat="server" ID="cbxCheckALLCategory" oncheckedchanged="cbxCheckALLCategory_CheckedChanged" AutoPostBack="true"/>
                                    </th>                                                                        
                                    <th class="title" width="20%">Tên</th>   
                                    <th class="title" width="10%">Loại Tin</th>                                 
                                    <th class="title" width="35%">Mô Tả</th>  
                                    <th class="title" width="10%">Thứ tự</th>
                                    <th class="title" width="10%">Công bố</th>
                                </tr>
                            </thead>
                            <tbody>
                                
                                <asp:Repeater runat="server" ID="CategoryRepeater">
                                    <ItemTemplate>
                                        <tr class="row0">
                                            <td align="center"><%#Container.ItemIndex + 1%></td>
                                            <td align="center">
                                                <asp:CheckBox runat="server" ID="cbxCheckCategory"/>
                                                <asp:TextBox runat="server" ID="txtCategoryId" Text='<%# DataBinder.Eval(Container.DataItem, "ID")%>' Visible="false"></asp:TextBox>
                                            </td>                                                                                        
                                            <td>
                                                <a href='AddUpdateCategory.aspx?id=<%#DataBinder.Eval(Container.DataItem, "ID")%>'>
                                                    <%#DataBinder.Eval(Container.DataItem, "CATE_NAME")%>
                                                </a>
                                            </td>                                            
                                            <td>
                                                <%#DataBinder.Eval(Container.DataItem, "TYPECATE_NAME")%>
                                            </td>
                                            <td>
                                                <%#DataBinder.Eval(Container.DataItem,"DESCRIPTION") %>
                                            </td>
                                            <td align="center">
                                                <%# DataBinder.Eval(Container.DataItem, "SORTED")%>
                                            </td>                                                
                                            <td align="center">                                                
                                                <asp:Image runat="server" ID="imgViewIsPublic" ImageUrl="~/App_Themes/Images/menu/icon-16-checkin.png" Visible='<%#(bool)DataBinder.Eval(Container.DataItem, "RECORD_STATUS")%>'/>
                                                <asp:Image runat="server" ID="imgViewIsBlock" ImageUrl="~/App_Themes/Images/menu/icon-16-block-status.png" Visible='<%#!(bool)DataBinder.Eval(Container.DataItem, "RECORD_STATUS")%>'/>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <AlternatingItemTemplate>
                                        <tr class="row1">
                                            <td align="center"><%#Container.ItemIndex + 1%></td>
                                            <td align="center">
                                                <asp:CheckBox runat="server" ID="cbxCheckCategory"/>
                                                <asp:TextBox runat="server" ID="txtCategoryId" Text='<%# DataBinder.Eval(Container.DataItem, "ID")%>' Visible="false"></asp:TextBox>
                                            </td>                                            
                                            <td>
                                                <a href='AddUpdateCategory.aspx?id=<%#DataBinder.Eval(Container.DataItem, "ID")%>'>
                                                    <%#DataBinder.Eval(Container.DataItem, "CATE_NAME")%>
                                                </a>
                                            </td>
                                            <td>
                                                <%#DataBinder.Eval(Container.DataItem, "TYPECATE_NAME")%>
                                            </td>
                                            <td>
                                                <%#DataBinder.Eval(Container.DataItem,"DESCRIPTION") %>
                                            </td>    
                                            <td align="center">
                                                <%# DataBinder.Eval(Container.DataItem, "SORTED")%>
                                            </td>                                        
                                            <td align="center">                                                
                                                <asp:Image runat="server" ID="imgViewIsPublic" ImageUrl="~/App_Themes/Images/menu/icon-16-checkin.png" Visible='<%#(bool)DataBinder.Eval(Container.DataItem, "RECORD_STATUS")%>'/>
                                                <asp:Image runat="server" ID="imgViewIsBlock" ImageUrl="~/App_Themes/Images/menu/icon-16-block-status.png" Visible='<%#!(bool)DataBinder.Eval(Container.DataItem, "RECORD_STATUS")%>'/>
                                            </td>
                                        </tr>
                                    </AlternatingItemTemplate>
                                </asp:Repeater>
                            </tbody>
                        </table>
                        
                    </div>
                    
                    <div class="b">
                        <div class="b">
                            <div class="b"></div>
                        </div>
                    </div>
                </div><!--End element-box--------------------------------------------------->
    
</asp:Content>

